package com.zr.controller;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.zr.service.FindteaServiceljc;
import com.zr.serviceImpl.FindTeaServiceImplljc;

import net.sf.json.JSONArray;

public class Findtea1Controllerljc extends HttpServlet{
	//修改课程教师下拉列表框控制器
		FindteaServiceljc fs = new FindTeaServiceImplljc();
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		doPost(req, resp);
	}
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		req.setCharacterEncoding("utf8");
		resp.setCharacterEncoding("utf8");
		PrintWriter pw =resp.getWriter();
		JSONArray j = fs.findAllTeacher();
		pw.write(j.toString());
		pw.flush();
		pw.close();
	}
}
